home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / editors / origami / oribin.zoo / bindings / c-emacs.key < prev    next >
Encoding:
Text File  |  1991-07-09  |  5.7 KB  |  252 lines

  1. {{{  Notes about this keybinding
  2. ; These bindings are an experimental version for writing C programs in an
  3. ; Emacs-like environment.  At the moment, they are only similar to real
  4. ; Emacs c-mode, but I am still working...  My idea is to have an editor
  5. ; which saves me from typing bothering things, which supports a few aspects of
  6. ; C syntax but does not restrict one like a syntax-controlled editor does.
  7. ; If you have any ideas what could be useful for these bindings, write me
  8. ; a mail. You will not find any documentation for these bindings - look
  9. ; at the OCL code and try working with it.  As I said: an experimental
  10. ; version.
  11. ;
  12. ; Michael Haardt (mhaardt@ftp.thp.uni-koeln.de)
  13. }}}
  14.  
  15. {{{  these bindings are named C-Emacs
  16. (defbinding C-Emacs)
  17. }}}
  18. {{{  moving cursor
  19. (keybind backward-character (C-B))
  20. (keybind backward-character ($left))
  21. (keybind forward-character (C-F))
  22. (keybind forward-character ($right))
  23. (keybind previous-line (C-P))
  24. (keybind previous-line ($up))
  25. (keybind next-line (C-N))
  26. (keybind next-line ($down))
  27.  
  28. (keybind backward-word (M-"b))
  29. (keybind forward-word (M-"f))
  30.  
  31. (keybind beginning-of-line (C-A))
  32. (keybind end-of-line (C-E))
  33. (keybind beginning-of-fold (M-"<))
  34. (keybind end-of-fold (M-">))
  35.  
  36. (keybind previous-page (M-"v))
  37. (keybind previous-page ($prev_page))
  38. (keybind next-page (C-V))
  39. (keybind next-page ($next_page))
  40.  
  41. (keybind goto-line (M-"g))
  42. }}}
  43. {{{  folding
  44. (keybind open-fold (C-O))
  45. (keybind close-fold (C-C))
  46. (keybind enter-fold (M-C-O))
  47. (keybind exit-fold (M-C-C))
  48. (keybind unfold-fold (C-U))
  49. (keybind create-fold (M-C-N))
  50. (keybind create-auto-fold (M-C-A C-N))
  51. (keybind auto-header (M-C-A C-H))
  52. (keybind toggle-create-file-fold (C-X "a "c))
  53. (keybind open-file-fold (C-X "a "o))
  54. }}}
  55. {{{  editing
  56. (keybind newline-and-indent (C-J))
  57. (keybind newline-and-indent (C-M))
  58.  
  59. (keybind delete-previous-character (C-H))
  60. (keybind delete-character (C-D))
  61. (keybind delete-character (C-?))
  62.  
  63. (keybind transpose-characters (C-T))
  64.  
  65. (keybind case-word-capitalize (M-"c))
  66. (keybind case-word-lower (M-"l))
  67. (keybind case-word-upper (M-"u))
  68.  
  69. (keybind delete-to-end-of-line (C-K))
  70. (keybind delete-line (C-X C-K))
  71. (keybind undo-delete-line (C-X C-Y))
  72. (keybind kill-line (M-C-K))
  73. (keybind copy-to-kill-buffer (M-"w))
  74. (keybind fold-kill-buffer (C-Y))
  75. }}}
  76. {{{  search & replace
  77. (keybind search-forward (C-S))
  78. (keybind search-reverse (C-R))
  79.  
  80. (keybind incremental-search (C-X "s))
  81. (keybind reverse-incremental-search (C-X "r))
  82.  
  83. (keybind replace-string (M-"r))
  84. (keybind query-replace-string (M-C-R))
  85. }}}
  86. {{{  files
  87. (keybind insert-file (C-X C-I))
  88. (keybind save-file (C-X C-S))
  89. (keybind write-file (C-X C-W))
  90. (keybind read-file (C-X C-R))
  91. (keybind next-file (C-X C-N))
  92. (keybind previous-file (C-X C-P))
  93. }}}
  94. {{{  macros
  95. (keybind define-macro (C-X "())
  96. (keybind define-macro (C-X ")))
  97. (keybind execute-macro (C-X "e))
  98. }}}
  99. {{{  shell commands
  100. (keybind i-shell (C-X "c))
  101. (keybind shell-command (C-X "!))
  102. }}}
  103. {{{  modes
  104. (keybind add-mode-view (C-X "m "v))
  105. (keybind delete-mode-view (C-X C-M "v))
  106.  
  107. (keybind add-mode-overwrite (C-X "m "o))
  108. (keybind delete-mode-overwrite (C-X C-M "o))
  109.  
  110. (keybind add-mode-autosave (C-X "m "a))
  111. (keybind delete-mode-autosave (C-X C-M "a))
  112.  
  113. (keybind set-language (C-X "m "l))
  114. }}}
  115. {{{  arguments
  116. (keybind set-argument-0 (M-"0))
  117. (keybind set-argument-1 (M-"1))
  118. (keybind set-argument-2 (M-"2))
  119. (keybind set-argument-3 (M-"3))
  120. (keybind set-argument-4 (M-"4))
  121. (keybind set-argument-5 (M-"5))
  122. (keybind set-argument-6 (M-"6))
  123. (keybind set-argument-7 (M-"7))
  124. (keybind set-argument-8 (M-"8))
  125. (keybind set-argument-9 (M-"9))
  126. }}}
  127. {{{  special functions
  128. (keybind abort (C-G))
  129.  
  130. (keybind redraw-display (C-L))
  131.  
  132. (keybind quote-character (C-Q))
  133.  
  134. (keybind help (M-"?))
  135. (keybind describe-bindings (C-X "?))
  136. (keybind describe-fold (C-X "=))
  137. }}}
  138. {{{  how to get out
  139. (keybind exit-origami (C-X C-C))
  140. (keybind quick-exit (M-"z))
  141. }}}
  142.  
  143. {{{  compile-it
  144. {{{F compile.fun
  145. :::F compile.fun
  146. }}}
  147.  
  148. (keybind compile-it (M-"! "m))
  149. }}}
  150. {{{  version-control
  151. {{{F version.fun
  152. :::F version.fun
  153. }}}
  154.  
  155. (keybind check-out (M-"! "c "o))
  156. (keybind check-in (M-"! "c "i))
  157. }}}
  158. {{{  goto-matching-fence
  159. {{{F go-match.fun
  160. :::F go-match.fun
  161. }}}
  162.  
  163. (keybind goto-matching-fence (M-C-F))
  164. }}}
  165. {{{  beautify-c-code
  166. (deffun beautify-c-code
  167. (
  168.   filter-buffer "cb newline-and-indent
  169. ))
  170.  
  171. (keybind beautify-c-code (M-"i))
  172. }}}
  173.  
  174. {{{  parens
  175. (deffun paired-parens
  176. (
  177.   "( ")
  178.   backward-character
  179. ))
  180. (keybind paired-parens ("( ))
  181. }}}
  182. {{{  brackets
  183. (deffun paired-brackets
  184. (
  185.   "[]
  186.   backward-character
  187. ))
  188. (keybind paired-brackets ("[ ))
  189. }}}
  190. {{{  curly brackets
  191. (deffun paired-curly-brackets
  192. (
  193.   {{{  corrrect position?!
  194.   store-pos x_pos_cb
  195.   beginning-of-line
  196.   if test-char "  (
  197.     goto-counter x_pos_cb
  198.   ) else (
  199.     end-of-line
  200.     newline-and-indent
  201.   ) fi
  202.   }}}
  203.   "{
  204.   newline-and-indent
  205.   "}
  206.   previous-line
  207.   end-of-line
  208.   newline-and-indent
  209.   forward-character forward-character
  210. ))
  211. (keybind paired-curly-brackets ("{ ))
  212. }}}
  213. {{{  doublequotes
  214. (deffun paired-doublequotes
  215. (
  216.   "" ""
  217.   backward-character
  218. ))
  219. (keybind paired-doublequotes ("" ))
  220. }}}
  221. {{{  singlequotes
  222. (deffun paired-singlequotes
  223. (
  224.   "' "'
  225.   backward-character
  226. ))
  227. (keybind paired-singlequotes ("' ))
  228. }}}
  229. {{{  semicolon
  230. (deffun semicolon (
  231.   end-of-line
  232.   O_LEFT
  233.   if not(test-char ";) (
  234.     if not(test-char " ) (O_RIGHT) fi
  235.     ";
  236.   ) fi
  237.   beginning-of-line
  238.   store-pos x_pos_sem
  239.   O_DOWN
  240.   beginning-of-line
  241.   if test-char "  (
  242.     O_UP beginning-of-line O_DOWN
  243.   ) else (
  244.     store-pos x2_pos_sem
  245.     inv-counter x2_pos_sem
  246.     sum-counter x_pos_sem x2_pos_sem
  247.     if counter>0 x_pos_sem (O_UP end-of-line O_RETURN) fi
  248.   ) fi
  249. ))
  250. (keybind semicolon (";))
  251. }}}
  252.